home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / tutorials / OGLT / Examples / TerrainFollowing / src.hansen / README < prev    next >
Encoding:
Text File  |  1996-11-11  |  4.8 KB  |  132 lines

  1.  
  2.                        Terrain Following ala Paul Hansen
  3.  
  4. ----------------------------------------------------------------------------
  5.  
  6.                   The Elevator program has been tested on
  7.          High and Maximum Indigo▓ Impact systems running IRIX 6.2.
  8.          It is always preferable to run it on systems with 4 TRAMS.
  9.                                   WARNING
  10.       The TEXTURE_LOD EXTension is not implemented prior to IRIX 6.2.
  11.  This application is best run on systems with at least 128 Mb of system memory.
  12.  
  13.             It is NOT expected to run on the following systems:
  14.                             -- Infinite Reality
  15.                              -- Reality Engine
  16.  
  17.      The Elevator binary included on v6.1 of the Developer Toolbox was
  18.           generated on an IRIX 6.2 Indigo▓ Impact system.
  19.  
  20.                   This directory contains a fake core file 
  21.                     to avoid generating large core files.
  22.  
  23.        In order to recompile you must install the GLUT 3.0 software,
  24.             included on this v6.1 Toolbox, onto your own system.
  25.               The inst images or tardist file can be found in
  26.  
  27.                   toolbox/src/exampleCode/opengl/GLUT/inst
  28.  
  29.     Author : Patrick Bouchaud      &     Paul Hansen
  30.              galaad@neu.sgi.com          hansen@engr.sgi.com
  31.  
  32.  
  33. PURPOSE:
  34. ========
  35.  
  36.     A wide range of applications require mapping satellite photographs
  37. (2D texture) onto terrain elevation data (Geometry), and navigating over
  38. the resulting scene in real-time.
  39.  
  40.     The diverse texture LOD are loaded independently, depending on the
  41. actual distance to the geometry (see TEXTURE_LOD EXTension)
  42.  
  43.     Paul Hansen (hansen@engr.sgi.com) integrated the texture tiling,
  44. and LOD, for this 6,000x6,000 satellite image (courtesy of SAGEM).
  45.  
  46. AUTHORS's tricks :
  47. ==================
  48.  
  49.     My Makefile first creates a .ofiles directory, where all the .o
  50. files go, and where the actual executable $(TARGET).EXE is generated.
  51. A $(TARGET) link is then created from the current directory to the
  52. executable.
  53.  
  54.     This Makefile currently generates a fake core file without any
  55. write permission. This is to avoid generating a core file which would
  56. be over 50Mb, should you run this program on a non IRIX 6.2 IMPACT
  57. system.
  58.  
  59.     A more elaborate description of enhancements is provided in the
  60. "Fast VisSim On Impact Graphics" article included in this directory.
  61.  
  62. Libraries :
  63. ===========
  64.  
  65.     These Examples use P.Haeberli's libimage.a, and M.Kilgard's
  66. libglut.a.
  67.     I assume these files are located under /usr/lib, and the image.h
  68. header can be found under /usr/include/gl, whereas the glut.h file
  69. should be under /usr/include/GL.
  70.  
  71. CODE ARCHITECTURE :
  72. ===================
  73.  
  74. The code is made of 2 separate modules :
  75.  
  76.     The Main module               - Main.c
  77.     The Culling module            - culling.c
  78.  
  79. 1) The Main module :
  80. --------------------
  81.  
  82. A.  Interface with GLUT to open the main window, and handle associated
  83.     callbacks.  Read the elevation data.  The resulting geometry data
  84.     are stored in a "Elevation Terrain[lat][lon]" array
  85.  
  86. B.  Finally, the main purpose of the Main module is to draw the
  87.     geometry, using many different technics depending on the current
  88.     drawing parameters - set by the user-interface.
  89.  
  90.     The function is supposed to draw a latitude=constant strip, with
  91.     longitudes varying from lonmin to lonmax arguments.
  92.  
  93. 2) The Culling Module :
  94. -----------------------
  95.  
  96.     The culling algorithm is implemented as follow :
  97.  
  98.     We first get the vertex coordinates of the current viewing frustum
  99. pyramid.  We record these coordinates in a geometry structure which is
  100. hierarchized as follows : vertex data <- edge data <- face data (a face
  101. is made of N edges, each edge being made of 2 vertice). We want to NOT
  102. duplicate the vertex coordinates, to make sure rounding errors will
  103. not make the geometry fall apart.
  104.  
  105.     Then we clip our viewing pyramid with the scene bounding box, i.e.
  106. considering a facetted volume is defined by a combination of plane
  107. inequations, we clip our viewing pyramid with each of the half spaces.
  108.  
  109. THE INITIAL REMAINING STEPS WERE :
  110.  
  111.     Finally, on the truncated pyramid :
  112.     We get the min and max latitude values
  113.     for all the planes latitude=constant within [latmin, latmax]
  114.  
  115.         we compute the min and max longitudes of the lat=cst plane
  116.         intersected with the truncated pyramid
  117.  
  118.         we call the callback function with (latmin, lonmin, lonmax )
  119.         (in fact we send the maximum limits with the previous strip)
  120.  
  121.     end for
  122.  
  123. AFTER INTEGRATION OF THE TILING, and LOD CONTROL :
  124.  
  125.     We use the same routines (min/max latitude and min/max longitudes)
  126. to iterate along each tile. The drawing of the triangles which cross
  127. tile-boundaries is done using triangle fans, as explained in the
  128. accompanying showcase file.
  129.  
  130. ----------------------------------------------------------------------------
  131. Copyright ⌐ 1996, Silicon Graphics, Inc.
  132.